using System.Runtime.InteropServices;

namespace WindowsAPI
{
    //[StructLayout(LayoutKind.Sequential)]
    //public struct SYSTEM_BASIC_INFORMATION
    //{
    //    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 24)]
    //    public byte[] Reserved1;
    //    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
    //    public IntPtr[] Reserved2;
    //    public byte NumberOfProcessors;
    //}

    [StructLayout(LayoutKind.Sequential)]
    public struct SYSTEM_BASIC_INFORMATION
    {
        public int Reserved;
        public int TimerResolution;
        public int PageSize; // 4096 (4kB) on 32-bit systems, 8192 (8kB) on 64-bit systems
        public int NumberOfPhysicalPages; // pages of physical memory
        public int LowestPhysicalPageNumber;
        public int HighestPhysicalPageNumber;
        public int AllocationGranularity;
        public int MinimumUserModeAddress;
        public int MaximumUserModeAddress;
        public int ActiveProcessorsAffinityMask;
        public byte NumberOfProcessors;
    }
}